<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category   design_blank
 * @package    Mage
 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<div class="page-title">
    <h2><?php echo $this->__('Order #%s (%s)', $order->getOrderId(), $order->getStatus()) ?></h2>
</div>
<div class="col2-set">
        <div class="col-1">
            <h3><?php echo $this->__('Billing Information') ?></h3>
            <address>
                    <?php echo $order->getAddressByType('billing')->format('html') ?>
            </address>
        </div>
        <div class="col-2">
            <h3><?php echo $this->__('Payment Method') ?></h3>
            <?php echo $this->getChildHtml('payment') ?>
        </div>
    </div>
    <div class="col2-set">
        <div class="col-1">
            <h3><?php echo $this->__('Shipping Information') ?></h3>
            <address>
                <?php echo $order->getAddressByType('shipping')->format('html') ?>
            </address>
        </div>
        <div class="col-2">
            <h3><?php echo $this->__('Shipping Method') ?></h3>
            <?php echo $order->getShippingDescription() ?>
        </div>
    </div>
<?php $_items = $order->getEntitiesByType('item') ?>
<table class="data-table" id="my-orders-table">
    <thead>
        <tr>
            <th><?php echo $this->__('Items Order') ?></th>
            <th><?php echo $this->__('Qty') ?></th>
            <th><?php echo $this->__('Price') ?></th>
            <th><?php echo $this->__('Ext. Price') ?></th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="4">
                <?php echo $this->__('Grand Total: %s', $order->getGrandTotal()) ?>
            </td>
        </tr>
    </tfoot>
    <tbody>
        <?php foreach($_items as $_item): ?>
        <tr>
            <td><?php echo $this->htmlEscape($_item->getName()) ?></td>
            <td><?php echo $_item->getQty() ?></td>
            <td><?php echo $_item->getPrice() ?></td>
            <td><?php echo $_item->getRowTotal() ?></td>
        </tr>   
        <?php endforeach ?> 
    </tbody>
</table>
<script type="text/javascript">decorateTable('my-orders-table')</script>
<div class="buttons-set">
    <a href="<?php echo $this->getUrl('customer/order/history') ?>" class="back-link">&laquo; <?php echo $this->__('Back') ?></a>
</div>
